import request from '@/utils/request.js';

//根据用户id获取对话列表
export function getChatList(userId) {
  return request({
    url: '/chat',
    method: 'get',
    params: {
      id: userId
    }
  });
}
//获取历史消息
export function getHistoryMessage(conversationId) {
  return request({
    url: '/chat/record',
    method: 'get',
    params: {
      conversationId: conversationId
    }
  });
}

//获取会话id
export function getConversationId(userId, targetId) {
  return request({
    url: '/chat/conversationId',
    method: 'get',
    params: {
      userId: userId,
      targetId: targetId
    }
  });
}